class Student:
    def __init__(self,age,name,sex,height):
        self.name = name
        self.age=age
        self.sex=sex
        self.height=height



        # print('初始化的值')

student1 =Student('18','张三','女','183')#对象初始化的时候可以传值
print(student1.age)#获取值
print(student1.name)
print(student1.sex)
print(student1.height)
student1.name='lis'

#使用init方法不需要调用,会自动调用,在创建对象的时候就可以赋值
student2 =Student('25','葫芦娃','男','120')
